home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 1 / Gold Medal Software Volume 1 (Gold Medal) (1994).iso / prog / tpwprog5.arj / PRINTOUT.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-07-02  |  738 b   |  33 lines

  1. program PrintOut;
  2. uses WinCrt;
  3. var
  4.   F, P: Text;
  5.   FileName: String[128];
  6.   S: String;
  7. begin
  8.   Write('File to print? ');
  9.   Readln(FileName);
  10.   if Length(FileName) > 0 then
  11.   begin
  12.     Assign(P, 'PRN');
  13.     Rewrite(P);
  14.     Assign(F, FileName);
  15.     Reset(F);
  16.     Write('Printing...');
  17.     while not Eof(F) do
  18.     begin
  19.       Readln(F, S);
  20.       Writeln(P, S)
  21.     end;
  22.     Writeln;
  23.     Writeln('Done printing');
  24.     Close(F); Close(P)
  25.   end;
  26.   Writeln('Press Alt+F4 to close window')
  27. end.
  28.  
  29. {--------------------------------------------------------------
  30.   Copyright (c) 1991 by Tom Swan. All rights reserved.
  31.   Revision 1.00    Date: 4/09/1991
  32. ---------------------------------------------------------------}
  33.